#ifndef DEBUGGEROPTIONSPRJDLG_H
#define DEBUGGEROPTIONSPRJDLG_H

#include <wx/intl.h>
#include "configurationpanel.h"
#include "remotedebugging.h"

class M_Code_Project;
class wxListBox;
class DebuggerGDB;
class CodeBlocksEvent;

class DebuggerOptionsProjectDlg : public cbConfigurationPanel {
  public:
    DebuggerOptionsProjectDlg( wxWindow* parent, DebuggerGDB* debugger, M_Code_Project* project );
    virtual ~DebuggerOptionsProjectDlg();
    virtual wxString GetTitle() const { return _T( "调试器" ); }
    virtual wxString GetBitmapBaseName() const { return _T( "debugger" ); }
    virtual void OnApply();
    virtual void OnCancel() {}
  protected:
    void OnTargetSel( wxCommandEvent& event );
    void OnAdd( wxCommandEvent& event );
    void OnEdit( wxCommandEvent& event );
    void OnDelete( wxCommandEvent& event );
    void OnUpdateUI( wxUpdateUIEvent& event );
  private:
    void OnBuildTargetRemoved( CodeBlocksEvent& event );
    void OnBuildTargetAdded( CodeBlocksEvent& event );
    void OnBuildTargetRenamed( CodeBlocksEvent& event );
    void LoadCurrentRemoteDebuggingRecord();
    void SaveCurrentRemoteDebuggingRecord();
    DebuggerGDB* m_pDBG;
    M_Code_Project* m_pProject;
    wxArrayString m_OldPaths;
    RemoteDebuggingMap m_CurrentRemoteDebugging;
    int m_LastTargetSel;
    DECLARE_EVENT_TABLE()
};

#endif
